//
//  SchoolMapOCViewController.m
//  Venus
//
//  Created by qurongxiang on 2018/7/19.
//  Copyright © 2018年 zhaowang. All rights reserved.
//

#import "SchoolMapOCViewController.h"



@interface SchoolMapOCViewController () <BNNaviUIManagerDelegate,BNNaviRoutePlanDelegate>



@end

@implementation SchoolMapOCViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"开始导航";
    [BNCoreServices_RoutePlan setDisableOpenUrl:YES];
    [BNCoreServices_RoutePlan startNaviRoutePlan:BNRoutePlanMode_Recommend naviNodes:_nodesArray time:nil delegete:self userInfo:nil];
}


-(void)routePlanDidFinished:(NSDictionary *)userInfo {
    [BNCoreServices_UI showPage:BNaviUI_NormalNavi delegate:self extParams:nil];

}

//算路失败回调
- (void)routePlanDidFailedWithError:(NSError *)error andUserInfo:(NSDictionary *)userInfo {
   // [MBProgressHUD hideHUDForView:self.view animated:true];
}

- (id)naviPresentedViewController {
    return self;
}

- (void)onExitPage:(BNaviUIType)pageType  extraInfo:(NSDictionary*)extraInfo
{
    if (pageType == BNaviUI_NormalNavi)
    {
        [self.navigationController popViewControllerAnimated:true];
    }
    else if (pageType == BNaviUI_Declaration)
    {
        [self.navigationController popViewControllerAnimated:true];
    }
}


@end
